//
//  SingleReturn.h
//  GCD
//
//  Created by user on 16/4/14.
//  Copyright © 2016年 user. All rights reserved.
//
#define SingleInstanceH +(instancetype)sharedInstance;
#define SingleInstanceM \
static id _instance;\
\
+ (instancetype)allocWithZone:(struct _NSZone *)zone\
{\
        static dispatch_once_t token;\
        dispatch_once(&token, ^{\
        _instance = [super allocWithZone:zone];\
});\
\
return _instance;}\
\
+(instancetype)sharedSingle\
{\
\
    static dispatch_once_t token;\
    dispatch_once(&token, ^{\
    _instance = [[self alloc]init];\
});\
\
return _instance;\
}\
- (id)copyWithZone:(NSZone *)zone\
{\
return _instance;\
}


